package com.zjw.zy.datasource.dao;

import androidx.annotation.NonNull;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.zjw.zy.bean.WsMessage;

import java.util.List;

/**
 * @author ：zhong.jw
 * @date ：Created in 2022/12/4 23:22
 */
@Dao
public interface WechatMessageDao {

    @Insert
    void insertItem(@NonNull WsMessage item);


    @Delete
    void deleteItem(@NonNull WsMessage item);

    @Update
    void updateItem(@NonNull WsMessage item);

    @Query("SELECT * FROM wechat_message ORDER BY date")
    List<WsMessage> queryAll();
}
